unit uBaseFormLogo;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uBaseForm, pngimage, Menus, JvMenus, JvComponentBase, JvBalloonHint, ImgList, JvImageList, ActnList, JvVersionControlActions, ExtCtrls,
  JvExExtCtrls, JvImage, JvExControls, JvButton, JvTransparentButton, JvExtComponent, JvPanel, JvBevel, JvGradientHeaderPanel, AppEvnts, JvThreadTimer,
  JvThread, JvThreadDialog, JvMTComponents, JvTimer, PerlRegEx, uADStanIntf, uADStanOption, uADStanError, uADGUIxIntf, uADPhysIntf, uADStanDef,
  uADStanPool, uADPhysManager, uADCompClient, DB, StdCtrls, JvExStdCtrls, JvEdit, JvCombobox, Mask, JvExMask, JvToolEdit, JvMaskEdit,
  JvCheckedMaskEdit, JvDatePickerEdit, uADStanAsync, Grids, DBGrids,
  JvExDBGrids, JvDBGrid;

type
  TfBaseFormLogo = class(TfBaseForm)
    JvImage1: TJvImage;
    procedure FormResize(Sender: TObject);
    procedure JvPanelRightMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    function getNumberCaptionsForm : string;
  end;

var
  fBaseFormLogo: TfBaseFormLogo;

implementation

{$R *.dfm}

procedure TfBaseFormLogo.FormCreate(Sender: TObject);
begin
  inherited;
  Self.jvGHPanelTop.LabelCaption := Self.jvGHPanelTop.LabelCaption + getNumberCaptionsForm;
  Self.Caption := Self.jvGHPanelTop.LabelCaption;
end;

procedure TfBaseFormLogo.FormResize(Sender: TObject);
begin
  if Self.Width < 620 then
  begin
    Self.Width := 620;
    Exit;
  end;
  inherited;
end;

procedure TfBaseFormLogo.JvPanelRightMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if Self.Width < 620 then
  begin
    Self.Width := 620;
    Exit;
  end;
  inherited;
end;

function TfBaseFormLogo.getNumberCaptionsForm : string;
begin
  if Pos('_', Self.Name) > 0 then
    Result := '('+ Copy(Self.Name, Pos('_', Self.Name)+1, 1) +')'
  else
    Result := '';
end;

end.
